implementation the function and verify that the behave in the way described above.